/**
 * Project Reactor
 */


#ifndef _TCPCONNECTION_H
#define _TCPCONNECTION_H
#include "InetAddress.h"
#include "Socket.h"
#include "SocketIO.h"
#include <string>
using std::string;
class TcpConnection {
public: 
    
TcpConnection(int fd);
    
string recv();
    
/**
 * @param msg
 */
void send(const string msg);
string toString();
private: 
    Socket _sock;
    SocketIO _socketIO;
    InetAddress _localAddr;
    InetAddress _peerAddr;
    
InetAddress getLocalAddr();
    
InetAddress getPeerAddr();
};

#endif //_TCPCONNECTION_H
